import 'package:casdon/common/service/base_service.dart';
import 'package:casdon/common/service/servicer_provider.dart';
import 'package:flutter/material.dart';

extension ServiceExtensions on BuildContext {
  T getService<T extends BaseService>() {
    return ServiceProvider.of(this).getService<T>();
  }
}

// // 使用示例
// final tuyaService = context.getService<TuyaIoTService>();
// final devices = await tuyaService.getDevices();